home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 001-025 / scopedisk6 / 6809xasm / 6809.doc next >
Text File  |  1995-03-18  |  9KB  |  180 lines

  1.  
  2.  
  3.  
  4.                        6809 Cross Assembler for the Amiga
  5.                           ALPHA Version x.08 - 8/14/88
  6.  
  7.  
  8.   THIS ALPHA VERSION IS FREE FOR PERSONAL USE ONLY AND YOU MAY PASS IT
  9.   ON TO ANOTHER PERSON OR TO ANY BBS, GROUP OR CLUB THAT WILL NOT SELL
  10.   THE PROGRAM IN ANY WAY WITHOUT SENDING A PERCENTAGE FOR EACH COPY TO ME.
  11.   THE ONLY CHARGE ALLOWED IS FOR ACTUAL COSTS OF DISTRIBUTION (ANNUAL BBS OR
  12.   CLUB DUES, DUPLICATION DISKS, AND THE LIKE).
  13.  
  14.      Please send any comments or donations to the owner of this software:
  15.                                 Dave Casler
  16.                                 820 Blue Oak Dr.
  17.                                 Lewisville, Tx  75067
  18.  
  19.   This is a brief discription of the 6809 cross assembler to be run on the
  20.   Amiga. This is an ALPHA version. This is the first release of this
  21.   assembler. It has been tested on a working 6809 program. Included with
  22.   this assembler is the source test files used to help debug the program.
  23.   They will also show that this assembler can handle all of the instructions
  24.   and all of the addressing modes of the 6809. With any luck I will get some
  25.   feedback on this so that I can go to the BETA version. After the BETA
  26.   version I will release a final(if this is possible) version. I will be
  27.   using this assembler as I have a project using the 6809 already started.
  28.   I think I can port this to other microprocessors without to much trouble
  29.   if anybody is interested.
  30.  
  31.   The screen will not show the output listing if enabled unless you click
  32.   the window depth gadgets. What is shown is the field boxes. This was used
  33.   in de-bugging as it showed what the program thought the fields looked like.
  34.   In later version this will be moved to the background unless option
  35.   'd0x0004' is defined or there is an error. By default the only fields that
  36.   are displayed line by line are the 'File:', 'Include:' and 'Line #' fields.
  37.   A flag can be set to display all fields on pass2 (see 'Debug flags' below).
  38.  
  39.  
  40. Program Startup:
  41.   asm [source_file_name] <options>
  42.  
  43.      The source file name must end in ".a". You do not have to enter the
  44.      name with the ".a" as the program will add it if it finds it missing.
  45.  
  46.      The options are listed below. You can also see the options by entering
  47.      asm[RETURN]. The options may be entered together or one at a time except
  48.      for the options that have parameters. Some examples follow the options.
  49.         a - Display all db/dw bytes.
  50.               By default the program will only display the first five bytes.
  51.               If the 'a' option is entered as many output lines as needed
  52.               will be used to display the data with 5 bytes per line.
  53.      d[f] - Debug flags.
  54.               This is used to enter the program into the debug modes. At
  55.               present the flags that can be entered are as follows.
  56.                  0x0001 - Pause and display each line on pass 2
  57.                  0x0004 - Display the lines on the screen.
  58.                  0x0100 - Wait for operator to exit the program.
  59.               These flags have to be entered as an interger and can be
  60.               entered one at time or as one number.
  61.         h - Disable the HEX file output.
  62.               The HEX file is in Motorola S19 format.
  63.         l - Disable the listing.
  64.               This overrides the 'liston' and 'listoff' pseudo-ops.
  65.         m - Display the assembled macros (if not disabled by the 'l' option).
  66.         p - Disable the pause on errors.
  67.               By default the program will stop and display the line with
  68.               the error until the operator signals to continue.
  69.      s[n] - Change the Max symbol amount.
  70.               By default this is 500.
  71.         w - Wait for the operator to signal the program before exiting.
  72.               This is the same as the debug flag 0x0100.
  73.      Examples:
  74.         asm file_name hl
  75.         asm file_name h l
  76.         asm file_name h s1000
  77.         asm file_name d5 m
  78.  
  79. Output Listing:
  80.   The output is formatted for 132 column printer or an 80 column in condensed
  81.   mode. I found that there is no way to comment a program and fit it in 80
  82.   columns. The source file does not have to be formatted as this program will
  83.   format the output listing into the proper columns. AT PRESENT THE USE OF
  84.   TABS IN THE SOURCE HAS NOT BEEN TESTED. The output listing does not use
  85.   tabs. Also the output listing does not use formfeeds for paging. This is
  86.   done this way in the ALPHA version only as it helps in debugging. The out-
  87.   put listing is sent to 'stdout' (the screen unless redirected).
  88.  
  89. HEX File:
  90.   The HEX file name is the name of the source minus ".a" with ".HEX" added.
  91.  
  92. Macros:
  93.   At present the number of macros allowed is 20. The depth of the macros
  94.   (macro within a macro) is 9 plus the top level macro. A macro can not be
  95.   defined within another macro. Each macro can have up to 1000 characters
  96.   counting RETURNs. The macro name length(max) is 19 characters.
  97.  
  98. Labels/Symbols:
  99.   By default the max is 500. This can be changed by the 's' option on the
  100.   command line to anything above 100. The max length of each label/symbol
  101.   is 19 characters. The label/symbol can not start with a digit(0-9) or the
  102.   characters ^,$,%,!,#,+,-,*,/,\,(,),<,> or the comma.
  103.  
  104. Special Characters:
  105.   ! or ^ - These are the NOT or COMPLEMENT characters and can be used on
  106.            integers or symbols as in !sym1, ^sym2 or !500.
  107.        + - Add
  108.        - - Subtract
  109.        * - Multiply
  110.        / - Divide
  111.      ( ) - Grouping with a max level of 9 plus the top level.
  112.        $ - HEX
  113.        % - Binary
  114.        # - Immediate addressing
  115.        \ - Escape character, next character taken as is as in \A to get
  116.            the decimal value of the character 'A'.
  117.        $ - Present program or Data counter value.
  118.        < - Forced direct addressing.
  119.        > - Forced extended addressing.
  120.  
  121. Pseudo-ops:
  122.   cseg    - Start code segment with optional value for the program
  123.             counter.
  124.   db      - Define byte. More then one can be entered if separated by
  125.             a comma. The max source field is 25 characters counting
  126.             commas. (db 12,$34,%101,symbol)
  127.   ds      - Data skip. Will advance the data or program counter
  128.             without storing any value.
  129.   dseg    - Start data segment with optional value for the data counter.
  130.             This is useful for defining structures.
  131.               dseg              0
  132.               field1            ds    2
  133.               field2            ds    1
  134.               struct_name_SIZE  equ   $
  135.               
  136.               struct_name       ds    struct_name_SIZE     global area
  137.               
  138.               leax  struct_name,pcr
  139.               lda   field1,x
  140.   dw      - Define word. More then one can be entered if separated by
  141.             a comma. The max source field is 25 characters counting
  142.             commas. (dw 1234,$4567,%11001001,symbol)
  143.   ejec    - End current page.
  144.   else    - Used with the IF pseudo-ops.
  145.   endif   - Used to end an IF.
  146.   endm    - Used to end a macro definition.
  147.   equ     - Define a label, see Labels/Symbols.
  148.   fcb     - Same as 'db'.
  149.   fcw     - Same as 'dw'.
  150.   if      - Continue to assemble if value does not equal zero.
  151.             NEXT VERSION THIS WILL BE CHANGED TO IF SYMBOL IS DEFINED OR
  152.             VALUE DOES NOT EQUAL ZERO.
  153.   ifeq    - Continue to assemble if value equals zero.
  154.   ifneq   - Continue to assemble if value does not equal zero.
  155.   include - Include at this point a new source file. The program will add
  156.             ".a" if it is not included in the file name. At the end of the
  157.             include file, continue on with the present file. There may be up
  158.             to 9 levels of include files plus the command line source file.
  159.   liston  - Enable the output listing unless disable from the command line.
  160.   listoff - Disable the output listing unless already disabled from the
  161.             command line.
  162.   macro   - Define a macro. There can be up to 10 parameters for each
  163.             macro for each macro call defined as %0-%9.
  164.               pushall  macro
  165.                        pshs  d,x,y,u
  166.                        endm
  167.                        pushall           example of use
  168.               loada    macro
  169.                        lda   %0*10
  170.                        endm
  171.                        loada 5           example of use
  172.   opt     - Enter option from a assembly source line. The 's' option
  173.             can not be set from this.
  174.   org     - Set the program or data counter.
  175.   page    _ same as 'ejec'.
  176.   setdp   - Set the assembler direct page register. Used for automatic
  177.             direct page addressing. By default this equals 0.
  178.   ttl     - Set the page heading title (max characters is 50).
  179.  
  180.